<include file="Public:head"/>
<body class="gray-bg">
    <div class="wrapper wrapper-content">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>用户列表</h5>
                        <div class="ibox-tools" style="margin-top: -9px;">
                            <a href="javascript:location.reload();" class="btn btn-primary"><i class="fa fa-refresh"></i> 刷新</a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-sm-3">
                            </div>
                            <form class="form-inline" action="" method="get">
                                <div class="col-sm-9">
                                    <div class="input-group col-sm-3  pull-right">
                                        <input type="text" name="keyword" value="{$keyword?$keyword:'';}" placeholder="昵称或手机关键词" class="input-sm form-control">
			                                    <span class="input-group-btn">
			                                      <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
			                                    </span>
                                    </div>

                                    <div class="input-group col-sm-2 pull-right">
                                        <input type="text" name="email" placeholder="邮箱" value="{$email?$email:'';}" class="input-sm form-control select_no_border">
                                    </div>

                                    <div class="input-group col-sm-1 pull-right select_width">
                                        <select name="is_buyer" class="input-sm form-control select_no_border">
                                            <option value="">身份</option>
                                            <option value="0" <if condition="$is_buyer =='0'">selected</if>>会员</option>
                                            <option value="1" <if condition="$is_buyer =='1'">selected</if>>买手</option>
                                        </select>
                                    </div>
                                    <div class="input-group col-sm-1 pull-right select_width">
                                        <select name="is_buyer" class="input-sm form-control select_no_border">
                                            <option value="1" <if condition="$is_buyer =='1'">selected</if>>正常会员</option>
                                            <option value="0" <if condition="$is_buyer =='0'">selected</if>>被拉黑会员</option>
                                            <option value="-1" <if condition="$is_buyer =='-1'">selected</if>>被删除会员</option>
                                        </select>
                                    </div>
                                </div>
                            </form>
                        </div>

                        <br />

                        <div class="table-responsive">
                            <form action="__URL__/operate" method="post" id="operate_form">
                                <table class="table table-bordered table-hover"
                                       id="categoryTable">
                                    <thead>
                                        <tr class="active">
                                            <th><input onclick="choosebox(this)" type="checkbox" /></th>
                                            <th height="40">编号</th>
                                            <th>头像</th>
                                            <th>昵称</th>
                                            <th>性别</th>
                                            <th>会员类型</th>
                                            <th>城市</th>
                                            <th>绑定手机</th>
                                            <th width="90">邮箱</th>
                                            <th width="80">注册时间</th>
                                            <th width="80">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <volist name="users" id="users">
                                            <tr>
                                                <td><input type="checkbox" name="users_id[]" value="{$users['id']}" /></td>
                                                <td>{$users['id']}</td>
                                                <td><img alt="image" style="width:50px;height:50px;" class="img-circle" src="{$users['headimage']}"></td>
                                                <td><if condition="$users['nickname']">{$users['nickname']}<else/>暂无</if></td>
                                                <td>
                                                    <switch name="$users['sex']">
                                                        <case value="1">男</case>
                                                        <case value="2">女</case>
                                                        <default />未知
                                                    </switch>
                                                </td>
                                                <td>
                                                    <switch name="$users['is_buyer']">
                                                    <case value="1">买手</case>
                                                    <default />会员
                                                    </switch>
                                                </td>
                                                <td>
                                                    {$users['province']}{$users['city']}
                                                </td>
                                                <td>
                                                    <if condition="$users['mobile']">
                                                        {$users['mobile']}
                                                        <else/>
                                                        暂无
                                                    </if>

                                                </td>
                                                <td><if condition="$users['email']">{$users['email']}<else/>暂无</if></td>
                                                <td>{$users['create_time']|date="Y-m-d",###}</td>
                                                <td class="center" width="140">
                                                    <a href="{:url('Member/edit',array('id'=>$users['id']))}" class="btn btn-primary">查看</a>

                                                </td>
                                            </tr>
                                        </volist>
                                    </tbody>
                                </table>
                            </form>
                            <div class="col-sm-12" style="padding:0px;">
                                <ul class="pagination  pull-right">
                                    {$page}
                                </ul>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

</body>

</html>